/*
 * @Author: Turump 
 * @Date: 2021-04-26 11:06:43 
 * @Last Modified by: Turump
 * @Last Modified time: 2021-04-26 11:33:46
 */

import ActionBaseTask from "./ActionBaseTask";

const { ccclass, property, menu } = cc._decorator;

@ccclass
@menu("动作任务/OpacityTo")
export default class OpacityToTask extends ActionBaseTask {

    @property({ displayName: "目标透明度" })
    opacity = 0;

    getAction() {
        return cc.tween(this.node).
            delay(this.delayTime)
            .then(this.getPlayAudioTween())
            .to(this.actionDuration,
                { opacity: this.opacity })
    }
}
